﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NodeDetails.aspx.cs" Inherits="WebApplication.Admin.NodeDetails" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>节点明细</title>
    <script src="../../scripts/boot.js" type="text/javascript"></script>
    <style type="text/css">
        .form-label
        {
            width: 80px;
        }
        .title
        {
            background: #E1D9C6;
            padding-left: 10px;
        }
        .Point
        {
            display: inline-block;
            color: White;
            height: 100px;
            width: 100px;
            float: left;
            line-height: 100px;
            text-align: center;
            cursor: pointer;
            font-weight: bold;
        }
        .Point:hover
        {
            font-size: 14px;
        }
        .WaitingImg
        {
            background: url(../images/Waiting.png);
        }
        .CompletedImg
        {
            background: url(../images/Completed.png);
        }
        .WorkingImg
        {
            background: url(../images/Working.png);
        }
        .TimeoutImg
        {
            background: url(../images/Timeout.png);
        }
        .IgnoreImg
        {
            background: url(../images/Ignore.png);
        }
        #Points
        {
            padding: 2px;
            height: 100px;
        }
        #Points img
        {
            margin-top: 33px;
            height: 30px;
            display: block;
            float: left;
            border: 1px solid white;
            padding: 3px;
            line-height: 30px;
            vertical-align: middle;
        }
    </style>
</head>
<body>
    <div class="mini-fit" id="rootPanel" style="padding: 5px">
        <form id="form1" method="post" runat="server" enctype="multipart/form-data">
        <asp:HiddenField ID="hidID" ClientIDMode="Static" runat="server" />
        <asp:HiddenField ID="hidModelData" ClientIDMode="Static" runat="server" />
        <asp:HiddenField ID="hidProjectID" ClientIDMode="Static" runat="server" />
        <script type="text/javascript">            writeStatusHtml();</script>
        <table cellpadding="3" border="1" width="100%" style="border-collapse: collapse">
            <tr>
                <td style="font-size: 14px; font-weight: bold;">
                    节点设置-土地及建筑物信息核查
                </td>
            </tr>
            <tr>
                <td class="title">
                    说明
                </td>
            </tr>
            <tr>
                <td>
                    <pre>计划立项获批。 
2.1.2 完成拆迁范围内土地及建筑物测绘。 
2.1.3 涉及旧屋村用地的，已按规定进行旧屋村认定。</pre>
                </td>
            </tr>
            <tr>
                <td class="title">
                    节点流程
                </td>
            </tr>
            <tr>
                <td>
                    <div id="Points">
                        <asp:Repeater runat="server" ID="repWorkPoint">
                            <ItemTemplate>
                                <div onclick="showContacts('<%# Eval("ID") %>')" class='Point <%# Eval("Status") %>Img'
                                    status='<%# Eval("Status") %>' id='<%# Eval("ID") %>'>
                                    <%# Eval("Name") %>
                                </div>
                                <img src="../images/箭头A右.png" />
                            </ItemTemplate>
                        </asp:Repeater>
                    </div>
                    <div id="dataGridContacts" class="mini-datagrid" style="width: 99%; height: 180px;"
                        allowcelledit="true" allowcellselect="true" multiselect="true" showpager="false"
                        allowcellvalid="true" editnextonenterkey="true" editnextrowcell="true" idfield="ID"
                        emptytext="数据为空" showemptytext="true">
                        <div property="columns">
                            <div type="indexcolumn" headeralign="center">
                                序号</div>
                            <div type="checkcolumn">
                            </div>
                            <div field="Name" width="100%" vtype="required;maxLength:50">
                                联系人姓名
                            </div>
                            <div field="PhoneNumber" width="100%" vtype="required;maxLength:50">
                                联系人电话
                            </div>
                            <div field="Title" width="100%" vtype="required;maxLength:50">
                                联系人职务
                            </div>
                            <div field="RelatedParty" width="100%" vtype="required;maxLength:50">
                                与我司人员关系
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="title">
                    准备文件
                </td>
            </tr>
            <tr>
                <td>
                    <div id="dataGridInputFiles" class="mini-datagrid" style="width: 100%; height: 150px"
                        showpager="false" idfield="ID">
                        <div property="columns">
                            <div type="indexcolumn" headeralign="center">
                                序号</div>
                            <div type="checkcolumn">
                            </div>
                            <div field="Name" width="200" allowsort="true" vtype="maxLength:100">
                                文件名称
                                <input property="editor" class="mini-textbox" style="width: 100%;" />
                            </div>
                            <div field="FileURI" width="100%" allowsort="true" vtype="requeired">
                                文件
                                <input property="editor" name="OutFiles" class="mini-htmlfile" limittype="*.txt;*.doc;*.docx,*.xls,*.xlsx,*.pdf"
                                    style="width: 100%;" />
                            </div>
                            <div name="edit" field="ID" width="60" align="center" headeralign="center">
                                操作
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="title">
                    成果文件
                </td>
            </tr>
            <tr>
                <td>
                    <div id="dataGridOutputFiles" class="mini-datagrid" style="width: 100%; height: 150px"
                        showpager="false" idfield="ID">
                        <div property="columns">
                            <div type="indexcolumn" headeralign="center">
                                序号</div>
                            <div type="checkcolumn">
                            </div>
                            <div field="Name" width="200" allowsort="true" vtype="maxLength:100">
                                文件名称
                                <input property="editor" class="mini-textbox" style="width: 100%;" />
                            </div>
                            <div field="FileURI" width="100%" allowsort="true" vtype="requeired">
                                文件
                                <input property="editor" name="OutFiles" class="mini-htmlfile" limittype="*.txt;*.doc;*.docx,*.xls,*.xlsx,*.pdf"
                                    style="width: 100%;" />
                            </div>
                            <div name="edit" field="ID" width="60" align="center" headeralign="center">
                                操作
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="title">
                    备注说明
                </td>
            </tr>
            <tr>
                <td>
                    <span name="remark" class="mini-textarea" width="100%"></span>
                    <div id="WorkPointStatusPanel" style="display: inline-block">
                        小节点状态：
                        <input type="radio" name="PointStatus" id="Ignore" /><label onclick="$('#Ignore').get(0).checked=true;">非必要</label>
                        <input type="radio" name="PointStatus" id="Working" /><label onclick="$('#Working').get(0).checked=true;">进行中</label>
                        <input type="radio" name="PointStatus" id="Completed" /><label onclick="$('#Completed').get(0).checked=true;">已完成</label>
                    </div>
                    <div id="NodeStatusPanel" style="display: none">
                        环节状态：
                        <input type="radio" name="NodeStatus" id="NodeStatusIgnore" /><label onclick="$('#NodeStatusIgnore').get(0).checked=true;">非必要</label>
                        <input type="radio" name="NodeStatus" id="NodeStatusCompleted" /><label onclick="$('#NodeStatusCompleted').get(0).checked=true;">已完成</label>
                    </div>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <a class="mini-button" onclick="SaveData" iconcls="icon-save" style="width: 60px;
                        margin-right: 20px;">保存</a><a class="mini-button" onclick="Submit" iconcls="icon-ok"
                            style="width: 90px; margin-right: 20px;">提交审批</a> <a class="mini-button" onclick="onCancel"
                                iconcls="icon-cancel" style="width: 60px;">取消</a>
                </td>
            </tr>
            <tr>
                <td class="title">
                    审批记录
                </td>
            </tr>
            <tr>
                <td>
                    <div>
                        第1轮审批（CSPR14090001）发起日期：2014/9/1 10:23:50
                        <div id="dataGridAdult" class="mini-datagrid" style="width: 100%; height: 150px"
                            showpager="false" idfield="ID">
                            <div property="columns">
                                <div type="indexcolumn" headeralign="center">
                                    序号</div>
                                <div type="checkcolumn">
                                </div>
                                <div field="Name" width="200" allowsort="true" vtype="maxLength:100">
                                    文件名称
                                    <input property="editor" class="mini-textbox" style="width: 100%;" />
                                </div>
                                <div field="FileURI" width="100%" allowsort="true" vtype="requeired">
                                    文件
                                    <input property="editor" name="OutFiles" class="mini-htmlfile" limittype="*.txt;*.doc;*.docx,*.xls,*.xlsx,*.pdf"
                                        style="width: 100%;" />
                                </div>
                                <div name="edit" field="ID" width="60" align="center" headeralign="center">
                                    操作
                                </div>
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
        </form>
    </div>
    <script type="text/javascript" desc="保存 通用">
        var allContacts = <%=ContactsJson %>;
        mini.parse();
        var form = new mini.Form("form1");
    </script>
    <script type="text/javascript" desc="流程联系人">
        var dataGridContacts = mini.get("dataGridContacts");
        function showContacts(id) {
            var datas = new Array();
            for (var i = 0; i < allContacts.length; i++) {
                if (allContacts[i].NodePointID == id) {
                    datas.push(allContacts[i].ContactsItem);
                }
            }
            dataGridContacts.setData(datas);
        }
    </script>
    <script type="text/javascript" des="close&cancel event handler">
        function GetData() {
            var o = form.getData();
            o.ID = $("#hidID").val();
            var result = new Array();
            result.push(o);
            return result;
        }
        
    </script>
    <script type="text/javascript">
        $(function () {
            $("#Points").children().last().hide()
            var points = $(".Point");
            for (var i = 0; i < points.length; i++) {
                var status = points.eq(i).attr("status");
                if (status == "Working" || status == "Waiting") {
                    points.eq(i)
                    break;
                }
            }
        });
    </script>
</body>
</html>
